package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 救护区表
 * @TableName disposition_wq_jhq
 */
@TableName(value ="disposition_wq_jhq")
@Data
public class DispositionWqJhq implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 方案识别码
     */
    @TableField(value = "plan_code")
    private String planCode;

    /**
     * 救护区名称
     */
    @TableField(value = "rescue_area_name")
    private String rescueAreaName;

    /**
     * 救护区实体
     */
    @TableField(value = "inrescue_area_entity")
    private String inrescueAreaEntity;

    /**
     * 救护区说明
     */
    @TableField(value = "rescue_area_explanation")
    private String rescueAreaExplanation;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqJhq other = (DispositionWqJhq) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPlanCode() == null ? other.getPlanCode() == null : this.getPlanCode().equals(other.getPlanCode()))
            && (this.getRescueAreaName() == null ? other.getRescueAreaName() == null : this.getRescueAreaName().equals(other.getRescueAreaName()))
            && (this.getInrescueAreaEntity() == null ? other.getInrescueAreaEntity() == null : this.getInrescueAreaEntity().equals(other.getInrescueAreaEntity()))
            && (this.getRescueAreaExplanation() == null ? other.getRescueAreaExplanation() == null : this.getRescueAreaExplanation().equals(other.getRescueAreaExplanation()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPlanCode() == null) ? 0 : getPlanCode().hashCode());
        result = prime * result + ((getRescueAreaName() == null) ? 0 : getRescueAreaName().hashCode());
        result = prime * result + ((getInrescueAreaEntity() == null) ? 0 : getInrescueAreaEntity().hashCode());
        result = prime * result + ((getRescueAreaExplanation() == null) ? 0 : getRescueAreaExplanation().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", planCode=").append(planCode);
        sb.append(", rescueAreaName=").append(rescueAreaName);
        sb.append(", inrescueAreaEntity=").append(inrescueAreaEntity);
        sb.append(", rescueAreaExplanation=").append(rescueAreaExplanation);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}